package com.itheima.controller;

import org.springframework.security.access.annotation.Secured;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

@Controller
@RequestMapping("/product")
public class ProductController {
    /**
     * @Author pangzhao
     * @Date 2022-1-3 18:34
     * @Description 要求产品列表功能必须具有ROLE_ADMIN角色才能访问！
     **/
    @Secured("ROLE_PRODUCT")
    @RequestMapping("/findAll")
    public String findAll() {
        return "product-list";
    }


}
